<template>
  <div class="box">
    <select v-model="sel" @change="$emit('getNum', sel)">
      <option value="0">0</option>
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
    </select>

    <button @click="$emit('add')">+</button>
    <button @click="$emit('sub')">-</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      sel: 0
    }
  }
}
</script>

<style lang="less" scoped>
.box {
  margin: 20px 0;
}

button {
  width: 50px;
  margin: 0 10px;
  font-size: 14px;
}

select {
  width: 40px;
}
</style>
